import {ReactElement,FC} from 'react';
// 函数组件的泛型FC
type Iprops = {
    date:Date;
    name?:string;
}

const ClockA:FC<Iprops> = (props):ReactElement => {
    console.log(props);
    
    return(
        <fieldset>
            <legend>ClockA</legend>
            <h1>hello word!</h1>
            <h2>IS now{props.date.toLocaleTimeString()}</h2>
        </fieldset>
    )
}
export default ClockA